import { DEFAULT_LAYOUT } from '../base'
import { AppRouteRecordRaw } from '../types'

const Market: AppRouteRecordRaw = {
  path: '/market',
  name: 'market',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: '营销',
    requiresAuth: true,
    icon: 'icon-computer',
    order: 3,
  },
  children: [
    {
      path: '/market/n', // The midline path complies with SEO specifications
      name: 'marketN',
      component: () => import('@/views/market/n.vue'),
      meta: {
        locale: 'N元N件',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: '/market/spike', // The midline path complies with SEO specifications
      name: 'marketSpike',
      component: () => import('@/views/market/spike.vue'),
      meta: {
        locale: '限时秒杀',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: '/market/discount', // The midline path complies with SEO specifications
      name: 'marketDiscount',
      component: () => import('@/views/market/discount.vue'),
      meta: {
        locale: '限时折扣',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: '/market/max', // The midline path complies with SEO specifications
      name: 'marketMax',
      component: () => import('@/views/market/max.vue'),
      meta: {
        locale: '满减活动',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: '/market/coupon', // The midline path complies with SEO specifications
      name: 'marketCoupon',
      component: () => import('@/views/market/coupon.vue'),
      meta: {
        locale: '优惠券列表',
        requiresAuth: true,
        roles: ['*'],
      },
    },

    {
      path: '/market/distributes/productList', // The midline path complies with SEO specifications
      name: 'marketDistributesProductList',
      component: () => import('@/views/market/productList.vue'),
      meta: {
        locale: '添加商品',
        requiresAuth: true,
        hideInMenu: true,
        roles: ['*'],
      },
    },
    {
      path: '/market/activityGoods', // The midline path complies with SEO specifications
      name: 'marketActivityGoods',
      component: () => import('@/views/market/activityGoods.vue'),
      meta: {
        locale: '管理活动商品',
        requiresAuth: true,
        hideInMenu: true,
        roles: ['*'],
      },
    },
    {
      path: '/market/distribution',
      name: 'marketdistribution',
      component: () => import('@/views/market/distribution/index.vue'),
      meta: {
        locale: '分销管理',
        requiresAuth: true,
      },
      children: [
        {
          path: '/market/distribution/goods', // The midline path complies with SEO specifications
          name: 'marketdistributiongoods',
          component: () => import('@/views/market/distribution/goods.vue'),
          meta: {
            locale: '分销商品管理',
            requiresAuth: true,
            roles: ['*'],
          },
        },
        // {
        //   path: '/market/distribution/list', // The midline path complies with SEO specifications
        //   name: 'marketdistributionlist',
        //   component: () => import('@/views/market/distribution/list.vue'),
        //   meta: {
        //     locale: '分销员列表',
        //     requiresAuth: true,
        //     roles: ['*'],
        //   },
        // },
        // {
        //   path: '/market/distribution/level', // The midline path complies with SEO specifications
        //   name: 'marketdistributionlevel',
        //   component: () => import('@/views/market/distribution/level.vue'),
        //   meta: {
        //     locale: '分销等级管理',
        //     requiresAuth: true,
        //     roles: ['*'],
        //   },
        // },
      ],
    },
  ],
}

export default Market
